import { createApp } from "vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import axios from "@/router/axios.js";
import router from "@/router/index.js";
import store from "@/store/index.js";
import Avue from "@smallwei/avue";
import { install } from "@icon-park/vue-next/es/all";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "styles/common.scss";
import "@/permission.js";
import download from "@/util/download.js";
import App from "./App.vue";
import "@smallwei/avue/lib/index.css";
import "element-plus/theme-chalk/dark/css-vars.css";
import "@icon-park/vue-next/styles/index.css";
import Vue3CronPlusPicker from 'vue3-cron-plus-picker' // 引入组件
import 'vue3-cron-plus-picker/style.css'
import AvueFormDesign from "@sscfaith/avue-form-design";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

import zhCn from "element-plus/dist/locale/zh-cn.mjs";
app.config.globalProperties.$download = download;
app.use(ElementPlus, {
  locale: zhCn,
});
install(app);
window.axios = axios;
app.use(router);
app.use(store);
app.use(AvueFormDesign);
app.use(Vue3CronPlusPicker);
app.use(Avue, {
  axios,
});
app.mount("#app");
